<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>修改订单</title>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css">
<!--公共样式结束-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/module_form.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_memberAdd.css">
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.min.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.timer.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/common.js"></script>
<script src="__PUBLIC__/Plugins/Datepicker/WdatePicker.js"></script>
<style>
.attr{
	margin-left:30px;
}
.editbtn{
	background-color:#339900;
	color:#FFFFFF;
	padding:2px 4px;
	cursor:pointer;
}
.entitle{
	font-size:16px;
	font-weight:bold;
}
.attr_list{
	background-color:green;
	margin-right:5px;
	color:#FFFFFF;
}
</style>
</head>

<body>
	<div class="page_wraper">
	<form method="post" id="restaurantAdd_form">
		<input type="hidden" id="id" name="id" value="{$detail.id}">
		<input type="hidden" id="orderno" name="orderno" value="{$detail.orderno}">
		<div id="tab1_0" fortab="tab1">
			<table cellpadding="0" cellspacing="0" class="module_form" width="600">
				<tr>
					<td class="ele_title" width="40%"><label for="cardnum">订单号：</label></td>
					<td class="ele_content" colspan="3">{$detail.orderno}</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="cardnum">处理结果：<em>*</em></label></td>
					<td class="ele_content" colspan="3">
						<textarea name="remark" id="remark"></textarea>
					</td>
				</tr>
			</table>
		</div>
		</form>
	</div>
	<div class="page_footer pdtd10">
		<input type="button" name="submit" id="submit" value="确认提交"  class="form_ele_submit"/>
	</div>
</body>
<script type="text/javascript">
	//弹出窗口全局变量
	var api = frameElement.api, W = api.opener;
	$(function(){
		//滑动门
		$('.tabbar li').click(function(){
			var tabname = $('.tabbar>ul').attr('tabname');
			$('.tabbar li').removeClass('tabhover');
			$(this).addClass('tabhover');
			
			$('div[fortab="'+tabname+'"]').hide();
			$('#'+$(this).attr('show')).show();
		});
		
		//表格隔行换色
		$('.module_form tr:odd').addClass('odd');
		$('.module_form tr:even').addClass('even');
		
		//表单操作
		//重置
		$('.form_ele_reset').on('click',function(){
			$('#memberAdd_form').get(0).reset();
		});
		
		//提交
		$('.form_ele_submit').on('click',function(){
			
			var tipsObj = windowApi.lhgdialog.tips('正在提交数据...',5,etIcon.loading);
			
			//通过Ajax提交表单
			var postData     = {};
			postData = $("#restaurantAdd_form").serialize();
			
			var remark = $('#remark').val();
			if(remark == ""){
				tipsObj.close();
				windowApi.lhgdialog.alert('请输入投诉处理结果');return;
			}
			
			$.post("{:U('Order/order_iscomplaint')}", postData ,function(data){
				tipsObj.close();
				if(data.status==1){
					windowApi.lhgdialog.tips('数据提交成功！',2,etIcon.success,function(){
						//Ajax通讯成功后处理
						var obj = windowApi.lhgdialog.list['Order_index'];
						obj.reload(obj);
						frameApi.close(); //关闭当前窗口
					});
				}else{
					windowApi.lhgdialog.alert(data.info);
				}
			}, "json");
		});
	});
</script>
</html>
